package com.study.youlai.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.study.youlai.system.model.bo.ColumnMetaData;
import com.study.youlai.system.model.bo.TableMetaData;
import com.study.youlai.system.model.query.TablePageQuery;
import com.study.youlai.system.model.vo.TablePageVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName: DatabaseMapper
 * @Description: 数据库映射层
 * @Author: li
 * @Date: 2025/1/13 12:00
 * @Version 1.0
 **/
@Mapper
public interface DatabaseMapper extends BaseMapper {

    /**
     * 获取表分页列表
     *
     * @param page
     * @param queryParams
     * @return
     */
    Page<TablePageVO> getTablePage(Page<TablePageVO> page, TablePageQuery queryParams);

    /**
     * 获取表字段列表
     *
     * @param tableName
     * @return
     */
    List<ColumnMetaData> getTableColumns(String tableName);

    /**
     * 获取表元数据
     *
     * @param tableName
     * @return
     */
    TableMetaData getTableMetadata(String tableName);

}
